/**
 * 
 */
package com.moyq5.mvcmaker;

/**
 * @author Moyq5
 * @date 2016年9月27日
 */
public class MvcMakerConfigure {
	private String commonPath;
	private String beanPath;
	private String servicePath;
	private String modulePath;
	private String basePackage;
	private String moduleName;
	private String entityPackage;
	private String daoPackage;
	private String daoImplPackage;
	private String servicePackage;
	private String serviceImplPackage;
	private String jacksonPackage;
	private String jacksonFilterPackage;
	private String jacksonMixinPackage;
	private String controllerPackage;
	private String formPackage;
	private String searchPackage;
	
	public MvcMakerConfigure(String commonPath, String modulePath, String basePackage, String moduleName) {
		this.commonPath = commonPath;
		this.modulePath = modulePath;
		this.basePackage = basePackage;
		this.moduleName = moduleName;
		
		final String commonPackage = basePackage  + ".common";
		final String modulePackage = basePackage + "." + moduleName;
		
		entityPackage = commonPackage  + ".bean.entity";
		searchPackage = commonPackage  + ".bean.search";
		daoPackage = commonPackage  + ".dao";
		daoImplPackage = commonPackage  + ".dao.impl";
		servicePackage = commonPackage  + ".service";
		serviceImplPackage = commonPackage  + ".service.impl";
		
		jacksonPackage = modulePackage  + ".jackson";
		jacksonMixinPackage = modulePackage  + ".jackson.mixin";
		
		jacksonFilterPackage = modulePackage  + ".jackson.filter";
		controllerPackage = modulePackage  + ".controller";
		formPackage = modulePackage  + ".form";
		
	}

	public String getBeanPath() {
		return beanPath;
	}

	public String getServicePath() {
		return null != servicePath ? servicePath: getBeanPath();
	}
	
	@Deprecated
	public String getCommonPath() {
		return commonPath;
	}

	public String getModulePath() {
		return modulePath;
	}

	public String getBasePackage() {
		return basePackage;
	}

	public String getModuleName() {
		return moduleName;
	}

	public String getEntityPackage() {
		return entityPackage;
	}

	public String getDaoPackage() {
		return daoPackage;
	}

	public String getDaoImplPackage() {
		return daoImplPackage;
	}

	public String getServicePackage() {
		return servicePackage;
	}

	public String getServiceImplPackage() {
		return serviceImplPackage;
	}

	public String getJacksonPackage() {
		return jacksonPackage;
	}

	public String getJacksonFilterPackage() {
		return jacksonFilterPackage;
	}

	public String getJacksonMixinPackage() {
		return jacksonMixinPackage;
	}

	public String getControllerPackage() {
		return controllerPackage;
	}

	public String getFormPackage() {
		return formPackage;
	}

	public String getSearchPackage() {
		return searchPackage;
	}

}
